package com.czy.booktest02.demos.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.czy.booktest02.demos.pojo.dto.UserDto;
import com.czy.booktest02.demos.pojo.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    User selectAccount(String name);

    User isExist(UserDto userDto);

    int banUser(int id);


    List<User> selectAllUser();

    int updateStatus(@Param("id")int id,@Param("status")int status);

    int deleteUserById(int id);

    int setPermission(@Param("id") int id,@Param("permission") int permission);
}
